Optimal. Leaf size=403 \[ -\frac {2 (a-b) \sqrt {a+b} \left (4 a^2-3 b^2\right ) \cot (c+d x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{5 d}+\frac {2 \sqrt {a+b} \left (10 a^3-4 a^2 b-4 a b^2+3 b^3\right ) \cot (c+d x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{5 d}-\frac {2 a^3 \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}-\frac {2 a b^2 \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{5 d}-\frac {2 b^2 (a+b \sec (c+d x))^{3/2} \tan (c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.40, antiderivative size = 403, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4127, 4003,
4141, 4143, 4006, 3869, 3917, 4089} \begin {gather*} -\frac {2 a^3 \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{d}-\frac {2 (a-b) \sqrt {a+b} \left (4 a^2-3 b^2\right ) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{5 d}+\frac {2 \sqrt {a+b} \left (10 a^3-4 a^2 b-4 a b^2+3 b^3\right ) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{5 d}-\frac {2 a b^2 \tan (c+d x) \sqrt {a+b \sec (c+d x)}}{5 d}-\frac {2 b^2 \tan (c+d x) (a+b \sec (c+d x))^{3/2}}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3869
Rule 3917
Rule 4003
Rule 4006
Rule 4089
Rule 4127
Rule 4141
Rule 4143
Rubi steps
\begin {align*} \int (a+b \sec (c+d x))^{3/2} \left (a^2-b^2 \sec ^2(c+d x)\right ) \, dx &=-\int (-a+b \sec (c+d x)) (a+b \sec (c+d x))^{5/2} \, dx\\ &=-\frac {2 b^2 (a+b \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}-\frac {2}{5} \int \sqrt {a+b \sec (c+d x)} \left (-\frac {5 a^3}{2}-\frac {1}{2} b \left (5 a^2-3 b^2\right ) \sec (c+d x)+\frac {3}{2} a b^2 \sec ^2(c+d x)\right ) \, dx\\ &=-\frac {2 a b^2 \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{5 d}-\frac {2 b^2 (a+b \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}-\frac {4}{15} \int \frac {-\frac {15 a^4}{4}-\frac {3}{2} a b \left (5 a^2-2 b^2\right ) \sec (c+d x)-\frac {3}{4} b^2 \left (4 a^2-3 b^2\right ) \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 a b^2 \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{5 d}-\frac {2 b^2 (a+b \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}-\frac {4}{15} \int \frac {-\frac {15 a^4}{4}+\left (\frac {3}{4} b^2 \left (4 a^2-3 b^2\right )-\frac {3}{2} a b \left (5 a^2-2 b^2\right )\right ) \sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx+\frac {1}{5} \left (b^2 \left (4 a^2-3 b^2\right )\right ) \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 (a-b) \sqrt {a+b} \left (4 a^2-3 b^2\right ) \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{5 d}-\frac {2 a b^2 \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{5 d}-\frac {2 b^2 (a+b \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+a^4 \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx+\frac {1}{5} \left (b \left (10 a^3-4 a^2 b-4 a b^2+3 b^3\right )\right ) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=-\frac {2 (a-b) \sqrt {a+b} \left (4 a^2-3 b^2\right ) \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{5 d}+\frac {2 \sqrt {a+b} \left (10 a^3-4 a^2 b-4 a b^2+3 b^3\right ) \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{5 d}-\frac {2 a^3 \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{d}-\frac {2 a b^2 \sqrt {a+b \sec (c+d x)} \tan (c+d x)}{5 d}-\frac {2 b^2 (a+b \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(956\) vs. \(2(403)=806\).
time = 15.03, size = 956, normalized size = 2.37 \begin {gather*} -\frac {4 (a+b \sec (c+d x))^{3/2} \left (a^2-b^2 \sec ^2(c+d x)\right ) \left (-4 a^3 b \tan \left (\frac {1}{2} (c+d x)\right )-4 a^2 b^2 \tan \left (\frac {1}{2} (c+d x)\right )+3 a b^3 \tan \left (\frac {1}{2} (c+d x)\right )+3 b^4 \tan \left (\frac {1}{2} (c+d x)\right )+8 a^3 b \tan ^3\left (\frac {1}{2} (c+d x)\right )-6 a b^3 \tan ^3\left (\frac {1}{2} (c+d x)\right )-4 a^3 b \tan ^5\left (\frac {1}{2} (c+d x)\right )+4 a^2 b^2 \tan ^5\left (\frac {1}{2} (c+d x)\right )+3 a b^3 \tan ^5\left (\frac {1}{2} (c+d x)\right )-3 b^4 \tan ^5\left (\frac {1}{2} (c+d x)\right )+10 a^4 \Pi \left (-1;\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+10 a^4 \Pi \left (-1;\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}+b \left (-4 a^3-4 a^2 b+3 a b^2+3 b^3\right ) E\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}-\left (5 a^4-10 a^3 b-4 a^2 b^2+4 a b^3+3 b^4\right ) F\left (\text {ArcSin}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a-b}{a+b}\right ) \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{a+b}}\right )}{5 d (b+a \cos (c+d x))^{3/2} \left (a^2-2 b^2+a^2 \cos (2 c+2 d x)\right ) \sec ^{\frac {7}{2}}(c+d x) \sqrt {\frac {1}{1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}} \left (-1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right ) \left (1+\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )^{3/2} \sqrt {\frac {a+b-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )}{1+\tan ^2\left (\frac {1}{2} (c+d x)\right )}}}+\frac {\cos ^3(c+d x) (a+b \sec (c+d x))^{3/2} \left (a^2-b^2 \sec ^2(c+d x)\right ) \left (-\frac {4}{5} b \left (-4 a^2+3 b^2\right ) \sin (c+d x)-\frac {8}{5} a b^2 \tan (c+d x)-\frac {4}{5} b^3 \sec (c+d x) \tan (c+d x)\right )}{d (b+a \cos (c+d x)) \left (a^2-2 b^2+a^2 \cos (2 c+2 d x)\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(2170\) vs.
\(2(364)=728\).
time = 0.31, size = 2171, normalized size = 5.39
method | result | size |
default | \(\text {Expression too large to display}\) | \(2171\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a - b \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{\frac {5}{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} -\int -\left (a^2-\frac {b^2}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________